POV-Ray : Newsgroups : povray.newusers : Rollercoaster type maths (not possible in povray?) : Rollercoaster type maths (not possible in povray?) Server Time
29 Jul 2024 04:26:30 EDT (-0400)
  Rollercoaster type maths (not possible in povray?)  
From: CdeathJd
Date: 31 Jul 2006 19:00:00
Message: <web.44ce8ad119e69c80e2e0912a0@news.povray.org>
I'm using povray v3.6
im trying to make something of a rollercoaster, but cant figure it out at
all. I have a height field, n some atmospheric stuff in my scene, i also
have a start point and an end point. I also have a section of "track". Up
to this, everything is fine, but after this, povray refuses to work right,
i dont know why. In other programming languages, everything is fine, but
pov-ray wont compute!.

The way i understand making the track to be:
You have your first section, then your second section of track, which you
position over the first section, then turn it a little in either x,y,z or
either, in small amounts, then you move the piece forward repeat untill
your track is made.

PROBLEM: Pov ray doesn't have a command to move objects relative to their
current position AND ROTATION. I tried my method out, and the track was
flat, and completely curvless.

To get the camera rolling along the track i presume i'll need a array of 3d
coordinates of every track piece and its rotation, move the camera to the
track piece, turn it around to the same rotation as the track piece, then
move it "up" from the track.

FORESEEN PROBLEM: Pov ray doesn't have a command to move objects (the
camera) relative to their(its) current position AND ROTATION.

Also i tried to get the start and end point to be looking at each other and
this failed too. The start and end are basically two fancy open cylinders.

Note for the last problem i used the following method:
x1#=50
y1#=42.5
z1#=-212
x2#=350
y2#=42.5
z2#=240

angle2d=ATan2(x1-x2,z1-z2)

NOTE that only x and z are relevant, so this could be classed as a 2d
problem, but once again, it gives the answer -146 which is wrong, im not
exactly sure, but the correct value is something like 32.5 (not exactly
this but i used trial and error to get a rough idea

further info:
The "roller coaster doesn't HAVE to go round with physics such as gravity,
but if it makes things easier to include it please say so. I don't know why
this refuses to work in pov-ray and works in everything else, i think the
big let down is the lack of a move (with rotation) relevance command.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.